﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="PhuongDoAn.Admin.Country.Edit" %>


<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript">

        var showDataDecode = function () {
           App.txtCountryName.setValue(Ext.String.htmlDecode(App.txtCountryName.getValue()));
        }
        //Hàm đóng form và thực hiện thông báo
        function ReloadAddOrEdit() {
            window.top.reportResult('Thông báo cập nhật thành công');
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    
    <ext:ResourceManager ID="ResourceManager1" runat="server" ShowWarningOnAjaxFailure="true">
        <Listeners>
            <DocumentReady Handler="showDataDecode();" />
        </Listeners>
    </ext:ResourceManager>
    <ext:Viewport ID="vp" runat="server" Layout="FitLayout">
        <Items>
            <ext:FormPanel ID="frmEdit" runat="server" Title="" MonitorValid="true" ButtonAlign="Right"
                DefaultButton="btnCapNhat" LabelWidth="120" PaddingSummary="5px 5px 0" AutoScroll="true"
                Layout="ColumnLayout" LabelAlign="Right" BodyPadding="5" Border="false">
                <TopBar>
                    <ext:Toolbar ID="tb" runat="server">
                        <Items>
                            <ext:Button ID="btnCapNhat" runat="server" Text="Lưu" Icon="Disk" Before="return #{frmEdit}.isValid();">
                                <DirectEvents>
                                    <Click OnEvent="onSave">
                                        <EventMask ShowMask="true" Msg="Đang cập nhật, vui lòng chờ..." />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                            <ext:ToolbarSpacer />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:FieldContainer ID="fcUserName" runat="server" HideLabel="true" Layout="ColumnLayout"
                        ColumnWidth="1">
                        <Items>
                            <ext:TextField MaxLength="50" LabelAlign="Right" Margins="0 3 0 0" FieldLabel="Tên quốc gia"
                                ID="txtCountryName" runat="server" AllowBlank="false" IndicatorText="*" IndicatorCls="red-text"
                                Regex="\S" ColumnWidth="0.5" PaddingSpec="2 0 2 0" EnableKeyEvents="true">
                            </ext:TextField>
                        </Items>
                    </ext:FieldContainer>
                </Items>
                <BottomBar>
                    <ext:StatusBar ID="FormStatusBar" runat="server">
                        <Plugins>
                            <ext:ValidationStatus ID="ValidationStatus1" runat="server" FormPanelID="frmEdit"
                                ValidIcon="Accept" ErrorIcon="Exclamation" ShowText="[ Dữ liệu nhập chưa đúng ]"
                                HideText="Click ẩn thông báo" />
                        </Plugins>
                    </ext:StatusBar>
                </BottomBar>
                <Listeners>
                    <ValidityChange Handler="#{btnCapNhat}.setDisabled(!valid);" />
                </Listeners>
            </ext:FormPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
